package com.yao.dubboprovider;

import com.yao.dubboprovider.registry.RegistryCenter;
import com.yao.dubboprovider.registry.impl.ZKRegistryCenterImpl;
import com.yao.dubboprovider.server.NettyServerProvider;

/**
 * @author Henry Yao
 * @since 2021/5/3
 */
public class DubboProviderApplication {

    private static final String address = "127.0.0.1:8088";
    private static String packageName = "com.yao.dubboprovider.service";

    public static void main(String[] args) throws Exception {
        // 创建注册中心
        RegistryCenter registryCenter = new ZKRegistryCenterImpl();
        // 创建netty server
        NettyServerProvider serverProvider = new NettyServerProvider();
        serverProvider.publish(registryCenter, packageName, address);
        serverProvider.start();
    }
}
